<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class IndexController extends Controller
{
    // 列表
    public function index()
    {
        $date = date('Y-m-d', time());
        echo date('w', strtotime($date)).PHP_EOL;
        echo date('w', strtotime('2020-10-26')).PHP_EOL;
        echo date('Y-m-d', strtotime('+10 day', strtotime('2020-07-02'))).PHP_EOL;
        $i = 0;
        while ($i <= 4) {
            echo $i;
            $i++;
        }

        $aa = [1,2,3,4,2,4];
        sort($aa);
        sort($aa);
        var_dump($aa);
        echo "<br />";
        $date = '2020-10-28';
        echo date('Y-m-d', strtotime('+1 month', strtotime($date)));
        echo date('Y-m-d', strtotime('+2 month', strtotime($date)));
        echo date('Y-m-d', strtotime('+1 month', strtotime('2020-11-28')));

        echo '<br>'.(strtotime('2020-12-28') - strtotime('2020-11-29')) / 86400;
        echo '<br>'.(strtotime('2020-11-28') - strtotime('2020-10-28')) / 86400;

        var_dump('2020-10-25' < '2020-12-25');
    }
}
